package game.util;

public class HighscoreEntry implements Comparable<HighscoreEntry>{
	private String name;
	private int score;
	
	public HighscoreEntry(String name, int score){
		this.name = name;
		this.score = score;
	}
	
	public String getName(){
		return name;
	}
	
	public int getScore(){
		return score;
	}

	@Override
	public int compareTo(HighscoreEntry e) {
		if(e.getScore() == this.score)return 0;
		else if(e.getScore() > this.score)return 1;
		else return -1;
	}
}
